/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// ServiceRates object for NHibernate mapped table 'ServiceRates'.
	/// </summary>
	[Serializable]
	public class ServiceRates : IIdentifier
	{
		#region Member Variables
		protected long _id;
		protected Services _services;
		protected int _type;
		protected decimal _rate;
		protected IList<ServiceSubscriptions> _servicesubscriptions;
		#endregion
		#region Constructors
			
		public ServiceRates() {}
					
		public ServiceRates(Services services, int type, decimal rate) 
		{
			this._services= services;
			this._type= type;
			this._rate= rate;
		}

		public ServiceRates(Services services)
		{
			this._services= services;
		}
		
		#endregion
		#region Public Properties
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual Services Services
		{
			get { return _services; }
			set {_services= value; }
		}
		public  virtual int Type
		{
			get { return _type; }
			set {_type= value; }
		}
		public  virtual decimal Rate
		{
			get { return _rate; }
			set {_rate= value; }
		}
		public  virtual IList<ServiceSubscriptions> ServiceSubscriptions
		{
			get { return _servicesubscriptions; }
			set {_servicesubscriptions= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			ServiceRates castObj = (ServiceRates)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
